﻿<phone:PhoneApplicationPage 
    x:Class="BlobTowerDefense.SelectDifficultyPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True"
    OrientationChanged="PhoneApplicationPage_OrientationChanged">

    <UserControl.Resources>
        <Storyboard x:Name="animation_Menu_Show_FromDown">
            <DoubleAnimation From="800" To="0" Duration="0:0:1"
                             Storyboard.TargetName="translate_Menu"
                             Storyboard.TargetProperty="Y">
                <DoubleAnimation.EasingFunction>
                    <BackEase EasingMode="EaseOut" Amplitude="0.5"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>

        <Storyboard x:Name="animation_Menu_Show_FromUp">
            <DoubleAnimation From="-800" To="0" Duration="0:0:1"
                             Storyboard.TargetName="translate_Menu"
                             Storyboard.TargetProperty="Y">
                <DoubleAnimation.EasingFunction>
                    <BackEase EasingMode="EaseOut" Amplitude="0.5"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>

        <Storyboard x:Name="animation_Menu_Hide_FromDown">
            <DoubleAnimation From="0" To="-800" Duration="0:0:1"
                             Storyboard.TargetName="translate_Menu"
                             Storyboard.TargetProperty="Y">
                <DoubleAnimation.EasingFunction>
                    <BackEase EasingMode="EaseIn" Amplitude="0.5"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>

        <Storyboard x:Name="animation_Menu_Hide_FromUp">
            <DoubleAnimation From="0" To="800" Duration="0:0:1"
                                 Storyboard.TargetName="translate_Menu"
                                 Storyboard.TargetProperty="Y">
                <DoubleAnimation.EasingFunction>
                    <BackEase EasingMode="EaseIn" Amplitude="0.5"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
    </UserControl.Resources>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <ImageBrush ImageSource="../Images/Backgrounds/Background_MainMenu_Portrait.png"/>
        </Grid.Background>
        
        <Grid.RenderTransform>
            <TranslateTransform x:Name="translate_Menu"/>
        </Grid.RenderTransform>

        <TextBlock Margin="10, 170, 10, 0"
                   FontSize="56"
                       HorizontalAlignment="Center"
                   Text="{Binding ConverterParameter=SelectDifficulty_Label, Converter={StaticResource Localization}, Source={StaticResource Localization}}">
        </TextBlock>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="ContentPanel"
                    VerticalAlignment="Top"
                    Margin="10,250,10,0">            
            <Button Name="buttonEasy"
                    Content="{Binding ConverterParameter=DifficultyEasy_Label, Converter={StaticResource Localization}, Source={StaticResource Localization}}"
                    Width="240"
                    FontSize="50"
                    Foreground="LightGreen"
                    BorderBrush="LightGreen"
                    Background="DarkGreen"
                    Click="buttonDifficultySelected_Click">
            </Button>
            <Border Height="50"/>
            <Button Name="buttonMedium"
                    Content="{Binding ConverterParameter=DifficultyMedium_Label, Converter={StaticResource Localization}, Source={StaticResource Localization}}"
                    Width="240"
                    FontSize="50"
                    Foreground="LightYellow"
                    BorderBrush="LightYellow"
                    Background="Yellow"
                    Click="buttonDifficultySelected_Click"/>
            <Border Height="50"/>
            <Button Name="buttonHard"
                    Content="{Binding ConverterParameter=DifficultyHard_Label, Converter={StaticResource Localization}, Source={StaticResource Localization}}"
                    Width="240"
                    FontSize="50"
                    Foreground="Red"
                    BorderBrush="Red"
                    Background="DarkRed"
                    Click="buttonDifficultySelected_Click"/>
        </StackPanel>
    </Grid>
</phone:PhoneApplicationPage>
